SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.DnnProduct_SR_SQL_AddReport
(
	@ModuleId    int,
	@ReportDefinition    text,
	@ReportName       nvarchar(50),
	@Description	nvarchar(250),
	@ReportHeader    nvarchar(3000),
	@ReportFooter    nvarchar(3000),
	@ConnectionID int,
	@RestrictViewing bit,
	@HtmlEncode bit,
	@AutoExecute bit,
	@HideHeader bit
)
as
BEGIN
	INSERT INTO dbo.DnnProduct_SR_SQL_Reports 
		(ModuleId, ReportName, Description, ReportDefinition, ReportHeader, ReportFooter, ConnectionID, RestrictViewing, HtmlEncode,
		AutoExecute, HideHeader)
	VALUES 
		(@ModuleId, @ReportName, @Description, @ReportDefinition, @ReportHeader, @ReportFooter, @ConnectionID, @RestrictViewing, @HtmlEncode,
		@AutoExecute, @HideHeader)

	SELECT @@IDENTITY as ReportID
END

GO
